package com.peas.platform.module.icims.contract.initial.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 初始合同执行-转交
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_contract_initial_transfer`")
public class ContractInitialTransferPo extends BasePo {

    // 合同ID
    // 【初始合同表】
    @Comment(value = "合同ID")
    @NotNull(message = "合同ID不能为空")
    @TableField(value = "`contract_initial_id`", jdbcType = JdbcType.BIGINT)
    private Long contractInitialId;

    // 批次号
    @Comment(value = "批次号")
    @Size(max = 20, message = "批次号不能超过20个字符")
    @TableField(value = "`batch`", jdbcType = JdbcType.VARCHAR)
    private String batch;

    // 转交负责人
    // 【用户表】
    @Comment(value = "转交负责人")
    @NotNull(message = "转交负责人不能为空")
    @TableField(value = "`transfer_user_id`", jdbcType = JdbcType.BIGINT)
    private Long transferUserId;

    // 转交原因
    @Comment(value = "转交原因")
    @NotBlank(message = "转交原因不能为空")
    @TableField(value = "`transfer_reason`", jdbcType = JdbcType.CLOB)
    private String transferReason;

    // 指定通知人
    // 用户表多个ID
    @Comment(value = "指定通知人")
    @Size(max = 200, message = "指定通知人不能超过200个字符")
    @TableField(value = "`transfer_notify`", jdbcType = JdbcType.VARCHAR)
    private String transferNotify;

    // 转交状态
    // 枚举取值:ContractInitialTransferState
    @Comment(value = "转交状态", enumType = "ContractInitialTransferState")
    @Size(max = 20, message = "转交状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

}
